home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
002
/
chedit.arc
/
EGA.I
< prev
next >
Wrap
Text File
|
1986-07-23
|
4KB
|
92 lines
{
This program is placed in the public domain by its author, William Couture.
Copyright (c) 1986 by DDI. All Rights Reserved.
}
procedure loadega(var cshapes:charset; block:integer);
{ block is 0 or 1, depending on whether you want to load
the lower 128 characters (the standard ASCII characters),
or the upper 128 characters (the graphics characters).
Note, however, that loading the upper characters will
recalculate the character sizes based on the size of the
characters being loaded. Thus, if you load an 8 x 8 into
the upper characters, you will get an 8 x 8 display in
the lower 128 characters, even if the 8 x 14 character set
is still loaded. This can be ugly.... }
{ This procedure will load a CHEDIT character set as the
EGA resident character set. As CHEDIT character sets are
8 x 8, this will allow you to have a 43 line display, but
unfortunately most software does not understand a 43 line
display and squishes everything into the top 25 lines. Oh,
well... }
{ One last warning: After loading an 8 x 8 character set,
you will have to reset the cursor type so that you have
a visible cursor (the EGA cursor is on lines 12-13, which
are not displayed when characters are 8 rows high. }
begin
inline($b8/$10/$11/$8b/$56/<block/$b1/$07/$d3/$e2/$b9/$80/$00/
$bb/$00/$08/$55/$c4/$6e/<cshapes/$cd/$10/$5d);
end;
procedure loadega14(var shapes1,shapes2:charset; block:integer);
{ block is 0 or 1, depending on whether you want to load
the lower 128 characters (the standard ASCII characters),
or the upper 128 characters (the graphics characters).
Note, however, that loading the upper characters will
recalculate the character sizes based on the size of the
characters being loaded. Thus, if you load an 8 x 14 into
the upper characters, you will get an 8 x 14 display in
the lower 128 characters, even if an 8 x 8 character set
is still loaded. }
{ This procedure will combine two CHEDIT character sets into
an 8 x 14 character set for use as an EGA resident character
set (See the chedit documentation for details on the contents
of the character sets. }
var newshape : array[0..1791] of byte;
ii,j,k,l : integer;
begin { This is sort of like shuffling a deck }
l := 0;
for ii := 0 to 1 do { there are 2 sets of 32 characters in each }
begin { character set }
i := ii * 64;
for j := 0 to 31 do
begin
for k := 0 to 7 do { get the top 8 rows }
begin
newshape[l] := shapes1[(i+j)*8+k];
l := l+1;
end;
for k := 0 to 5 do { and the bottom 6 rows }
begin
newshape[l] := shapes1[(i+j+32)*8+k];
l := l+1;
end;
end;
end;
for ii := 0 to 1 do { now do it again for the 2nd (upper 64) set }
begin { of characters }
i := ii * 64;
for j := 0 to 31 do
begin
for k := 0 to 7 do
begin
newshape[l] := shapes2[(i+j)*8+k];
l := l+1;
end;
for k := 0 to 5 do
begin
newshape[l] := shapes2[(i+j+32)*8+k];
l := l+1;
end;
end;
end;
inline($8c/$d0/$8e/$c0/$b8/$10/$11/$8b/$96/block/$b1/$07/$d3/$d2/
$b9/$80/$00/$bb/$00/$0e/$55/$81/$c5/newshape/$cd/$10/$5d);
end;